Repository navigation
feat(ux): mark required fields with a red asterisk (#414) - #499
Merged
Merged
Conversation
A required field looked like every optional one until the press that failed on it (#412). The shared "field" template now carries a RequiredMarker part that the "required" class switches on: an asterisk in ErrorBrush after the caption. Shape and colour together, because a colour-only signal is lost to glare in the ELW. Every field backed by a Required *Error opts in -- 19 wrappers across ETB, Aufgaben, Beteiligte, Kräfte, Rollen, Atemschutz, CO-Messprotokoll and the operator prompt. Range rules (Timer, Stärke, AGT) and the Einsatzdaten dialog stay unmarked; a test guards the latter. The inputs inside a required field also set AutomationProperties.IsRequiredForForm, so screen readers announce what the asterisk only shows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #414
What
A required field looked exactly like an optional one until the press that failed on it (#412). The shared
HeaderedContentControl.fieldtemplate now has aRequiredMarkerpart: an asterisk inErrorBrushafter the caption, switched on byClasses="field required". The template was merged into one in #412 for exactly this reason, so this is a style rule plus a class on each view, with no second template.*Error. That is 19 wrappers across ETB, Aufgaben (dialog and dock), Beteiligte, Kräfte, Rollen (add and handover), Atemschutz, CO-Messprotokoll and the operator prompt (Gerät and PIN only appear in the join flow).AutomationProperties.IsRequiredForForm, so a screen reader announces what the asterisk only shows.One trap worth knowing: a
Foregroundset on the template part loses to theTextBlock.overlinestyle, because template values rank below styles. The asterisk rendered in caption grey. The colour therefore sits in the.requiredstyle rule, and a test pins it.Screenshots
Task dialog, before / after:
Join prompt, before / after:
Kräfte dock, before / after:
Verification
RequiredFieldMarkerTests: 6 headless tests. They were written first and failed 5/5 before the change.make clean ci: green. 0 warnings, 0 errors, noTest Run Failed.🤖 Generated with Claude Code